package com.example.object;

import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class ElectricPanels {

	String X;
	String Y;
	String Status_Name;
	String Status_ID;
	String Short_Name;
	String Road_Name;
	String Road_ID;
	String Panel_Type_Name;
	String Panel_Type_ID;
	String Panel_Name;
	String Panel_ID_MAP;
	String Panel_ID;
	String Longevity;
	String Long;
	String Lat;
	String IsActive;
	String Installed_Type_Name;
	String Installed_Type_ID;
	String Installed_Time;
	String ImageLink;

	String Group_Name;
	String Group_ID;
	String Enterprise_Name;
	String Enterprise_ID;
	String EVNCode;
	String Design_Capacity;
	String Address;
	String Actual_Capacity;
	String Action;

	public String getX() {
		return X;
	}

	public void setX(String x) {
		X = x;
	}

	public String getY() {
		return Y;
	}

	public void setY(String y) {
		Y = y;
	}

	public String getStatus_Name() {
		return Status_Name;
	}

	public void setStatus_Name(String status_Name) {
		Status_Name = status_Name;
	}

	public String getStatus_ID() {
		return Status_ID;
	}

	public void setStatus_ID(String status_ID) {
		Status_ID = status_ID;
	}

	public String getShort_Name() {
		return Short_Name;
	}

	public void setShort_Name(String short_Name) {
		Short_Name = short_Name;
	}

	public String getRoad_Name() {
		return Road_Name;
	}

	public void setRoad_Name(String road_Name) {
		Road_Name = road_Name;
	}

	public String getRoad_ID() {
		return Road_ID;
	}

	public void setRoad_ID(String road_ID) {
		Road_ID = road_ID;
	}

	public String getPanel_Type_Name() {
		return Panel_Type_Name;
	}

	public void setPanel_Type_Name(String panel_Type_Name) {
		Panel_Type_Name = panel_Type_Name;
	}

	public String getPanel_Type_ID() {
		return Panel_Type_ID;
	}

	public void setPanel_Type_ID(String panel_Type_ID) {
		Panel_Type_ID = panel_Type_ID;
	}

	public String getPanel_Name() {
		return Panel_Name;
	}

	public void setPanel_Name(String panel_Name) {
		Panel_Name = panel_Name;
	}

	public String getPanel_ID_MAP() {
		return Panel_ID_MAP;
	}

	public void setPanel_ID_MAP(String panel_ID_MAP) {
		Panel_ID_MAP = panel_ID_MAP;
	}

	public String getPanel_ID() {
		return Panel_ID;
	}

	public void setPanel_ID(String panel_ID) {
		Panel_ID = panel_ID;
	}

	public String getLongevity() {
		return Longevity;
	}

	public void setLongevity(String longevity) {
		Longevity = longevity;
	}

	public String getLong() {
		return Long;
	}

	public void setLong(String l) {
		Long = l;
	}

	public String getLat() {
		return Lat;
	}

	public void setLat(String lat) {
		Lat = lat;
	}

	public String getIsActive() {
		return IsActive;
	}

	public void setIsActive(String isActive) {
		IsActive = isActive;
	}

	public String getInstalled_Type_Name() {
		return Installed_Type_Name;
	}

	public void setInstalled_Type_Name(String installed_Type_Name) {
		Installed_Type_Name = installed_Type_Name;
	}

	public String getInstalled_Type_ID() {
		return Installed_Type_ID;
	}

	public void setInstalled_Type_ID(String installed_Type_ID) {
		Installed_Type_ID = installed_Type_ID;
	}

	public String getInstalled_Time() {
		return Installed_Time;
	}

	public void setInstalled_Time(String installed_Time) {
		Installed_Time = installed_Time;
	}

	public String getImageLink() {
		return ImageLink;
	}

	public void setImageLink(String imageLink) {
		ImageLink = imageLink;
	}

	public String getGroup_Name() {
		return Group_Name;
	}

	public void setGroup_Name(String group_Name) {
		Group_Name = group_Name;
	}

	public String getGroup_ID() {
		return Group_ID;
	}

	public void setGroup_ID(String group_ID) {
		Group_ID = group_ID;
	}

	public String getEnterprise_Name() {
		return Enterprise_Name;
	}

	public void setEnterprise_Name(String enterprise_Name) {
		Enterprise_Name = enterprise_Name;
	}

	public String getEnterprise_ID() {
		return Enterprise_ID;
	}

	public void setEnterprise_ID(String enterprise_ID) {
		Enterprise_ID = enterprise_ID;
	}

	public String getEVNCode() {
		return EVNCode;
	}

	public void setEVNCode(String eVNCode) {
		EVNCode = eVNCode;
	}

	public String getDesign_Capacity() {
		return Design_Capacity;
	}

	public void setDesign_Capacity(String design_Capacity) {
		Design_Capacity = design_Capacity;
	}

	public String getAddress() {
		return Address;
	}

	public void setAddress(String address) {
		Address = address;
	}

	public String getActual_Capacity() {
		return Actual_Capacity;
	}

	public void setActual_Capacity(String actual_Capacity) {
		Actual_Capacity = actual_Capacity;
	}

	public String getAction() {
		return Action;
	}

	public void setAction(String action) {
		Action = action;
	}

	@SuppressWarnings("null")
	public  static ArrayList<ElectricPanels> getListPanel(String text) throws JSONException {
		ArrayList<ElectricPanels> lstPanel = new ArrayList<ElectricPanels>();
		JSONArray jArr = new JSONArray(text);
		for (int i = 0; i < jArr.length(); i++) {
			ElectricPanels panel = new ElectricPanels();
			JSONObject jObj = jArr.getJSONObject(i);
			panel.setAction(jObj.getString("Action"));
			panel.setActual_Capacity(jObj.getString("Actual_Capacity"));
			panel.setAddress(jObj.getString("Address"));
			panel.setDesign_Capacity(jObj.getString("Design_Capacity"));
			//panel.setEnterprise_ID(jObj.getString("Enterprise_ID"));
			panel.setEnterprise_Name(jObj.getString("Enterprise_Name"));
		//	panel.setEVNCode(jObj.getString("VNCode"));
			panel.setEVNCode(jObj.getString("EVNCode"));
			panel.setGroup_ID(jObj.getString("Group_ID"));
			panel.setGroup_Name(jObj.getString("Group_Name"));
			panel.setImageLink(jObj.getString("ImageLink"));
			panel.setInstalled_Time(jObj.getString("Installed_Time"));
			panel.setInstalled_Type_ID(jObj.getString("Installed_Type_ID"));
			panel.setInstalled_Type_Name(jObj.getString("Installed_Type_Name"));
			panel.setIsActive(jObj.getString("IsActive"));
			panel.setLat(jObj.getString("Lat"));
			panel.setLong(jObj.getString("Long"));
			panel.setLongevity(jObj.getString("Longevity"));
			panel.setPanel_ID(jObj.getString("Panel_ID"));
			panel.setPanel_ID_MAP(jObj.getString("Panel_ID_MAP"));
			panel.setPanel_Name(jObj.getString("Panel_Name"));
			panel.setPanel_Type_ID(jObj.getString("Panel_Type_ID"));
			panel.setPanel_Type_Name(jObj.getString("Panel_Type_Name"));
			panel.setRoad_ID(jObj.getString("Road_ID"));
			panel.setRoad_Name(jObj.getString("Road_Name"));
			panel.setShort_Name(jObj.getString("Short_Name"));
			panel.setStatus_ID(jObj.getString("Status_ID"));
			panel.setStatus_Name(jObj.getString("Status_Name"));
			panel.setX(jObj.getString("X"));
			panel.setY(jObj.getString("Y"));
			lstPanel.add(panel);
		}
		return lstPanel;
	}
}
